<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="lib/three.js"></script>
		<script src="loaders/SVGRenderer.js"></script>
		<script src="loaders/Projector.js"></script>
		<script src="loaders/SVGLoader.js"></script>
	</head>

	<body>
	</body>
	<script>
		//此函数作为onLoad被传入.load
		function(svgObj) {
			//.load之后要载入的svg就被放入了svgObj中
			document.body.appenChild(svgObj);
		}

		var svgManager = new THREE.SVGLoader();
		//var url = 'https://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg';
		var url = 'tst.svg';

		function svg_loading_done_callback(doc) {
			init(new THREE.SVGObject(doc));
			render();
		};

		svgManager.load(url,
			svg_loading_done_callback,
			function() {
				console.log("Loading SVG...");
			},
			function() {
				console.log("Error loading SVG!");
			});
	</script>

</html>